{% extends "base.phtml" %}


{% block content %}

<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"></h3>
    </div>

    <form class="form-horizontal" action="save">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-2 control-label">用户组名</label>

                <div class="col-sm-3">
                    <input type="text" name="groupname" value="{{data?data.groupname:''}}" class="form-control col-xs-3" placeholder="">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">权限</label>
                <div class="col-sm-10">
                    {%for k,v in modules%}
                    <div class="col-sm-7 ">

                        {{k}}
                        {%for u,m in v%}
                        &nbsp;&nbsp;&nbsp;&nbsp;<label><input type="checkbox" name="privilege[]" class="minimal" value="{{u}}" {%if inarray(u,privileges)%}checked{%endif%}>
                            {{m}}</label>
                        {%endfor%}

                    </div>
                    {%endfor%}
                </div>
            </div>
        </div>

        <div class="box-footer text-center">
            <input type="hidden" value="{{data?data.id:0}}" name="id">
            <button class="btn btn-info submit">保存</button>
        </div>

    </form>
</div>

{% endblock %}
